Represents an instance of an online account. More...
Import Statement: | import SSO.OnlineAccounts 0.1 |
The Account element represents an online account. It is functional only if its objectHandle property is set to a valid account, which can be obtained with Manager.loadAccount() or Manager.createAccount().
accountId : string |
The account's numeric ID. This is 0 until the account has been stored into the DB.
accountServiceHandle : object |
A C++ object which can be used to instantiate an AccountService by setting it as the value for the AccountService::objectHandle property.
displayName : string |
The account's display name (usually the user's login or ID).
enabled : bool |
This read-only property tells whether the Account is enabled. An application shouldn't use an Account which is disabled.
objectHandle : object |
An opaque handle to the underlying C++ object. Until the property is set, the Account element is uninitialized. Similarly, if the C++ object is destroyed, expect the Account to become invalid.
provider : jsobject |
An immutable object representing the provider which provides the account. The returned object will have at least these members:
id
is the unique identified for this providerdisplayName
iconName
synced() |
Emitted when the account changes have been stored into the permanent storage.
Note: The corresponding handler is onSynced
.
void remove() |
Deletes the account from the permanent storage. This method accepts an optional parameter, which tells whether the credentials associated with the account should also be removed:
Account.RemoveAccountOnly
Account.RemoveCredentials
- the defaultvoid sync() |
Writes the changes to the permanent account storage.
void updateDisplayName(string displayName) |
Changes the display name of the account.
See also sync().
void updateEnabled(bool enabled) |
Enables or disables the account.
See also sync().